package cn.zjj.controller;

import cn.zjj.basic.utils.JsonResult;
import cn.zjj.domain.User;
import cn.zjj.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private IUserService userService;


    @GetMapping("/selectById/{id}")
    public User selectById(@PathVariable("id") Long id){
        return userService.selectById(id);
    }

    @GetMapping("/selectAll")
    public List<User> select(){
        return userService.select();
    }
   /* @PostMapping("/insert")
    public JsonResult insert(){

    }*/

}
